<template>
  <div class="product-banner-2">
    <div class="product-model">
      <div class="content f f-ac f-jc">
        <div class="content-box">
          <img v-slide-plus :src="info.image3" />
          <div v-slide-up class="f f-col f-jb">
            <div>
              <Title
                title="PRODUCT CORE FUNCTIONS"
                color="linear-gradient(90deg, #4580dd 0%, rgba(0, 0, 0, 0) 100%)"
                size="16"
                bold="700"
                sub-title="产品核心功能"
                sub-color="#0e0b31"
                sub-size="24"
                sub-bold="700"
                gap="10"
              />
              <el-collapse v-model="collapseName" accordion class="mt10">
                <el-collapse-item
                  v-for="(item, k) in info.core"
                  :key="k"
                  :title="item.name"
                  :name="k"
                >
                  <div class="collapse-content">{{ item.introduce }}</div>
                </el-collapse-item>
              </el-collapse>
            </div>
            <div v-slide-up class="btn-box" @click="handleContact">立即咨询</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script setup lang="ts">
const props = defineProps({
  info: {
    type: Object,
    default: () => {},
  },
});
const emit = defineEmits(["contact"]);

const collapseName = ref(0);

// 立即咨询
const handleContact = () => {
  emit("contact", `产品核心功能：${props.info.name}`);
};
</script>
<style lang="scss" scoped>
.product-banner-2 {
  width: 100%;
  background: url("../../../../assets/product/banner_block_bg.png") no-repeat;
  background-size: 427px 570px;
  background-position: left bottom;
  background-color: #f6f6f6;
  .product-model {
    width: 90%;
    margin: 0 auto;
    height: 570px;
    position: relative;
    .content {
      width: 100%;
      height: 570px;
      .content-box {
        display: flex;
        align-items: center;
        width: 100%;
        > div {
          flex: 1;
          max-width: 50%;
          .collapse-content {
            padding: 12px 26px;
          }
          .btn-box {
            width: 164px;
            height: 54px;
            font-size: 14px;
            font-weight: 700;
            color: #fff;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: #4580dd;
            &:hover {
              cursor: pointer;
              background-color: #3a6dc0;
            }
          }
        }
        img {
          width: 529px;
          height: 418px;
          margin-right: 160px;
          filter: drop-shadow(0 0 10px rgba(101, 101, 101, 0.5));
          object-fit: cover;
        }
      }
    }
  }
}
:deep(.el-collapse) {
  border-radius: 12px;
  overflow: hidden;
  .el-collapse-item__header {
    padding: 18px 26px;
    background: #fafafa;
  }
  .el-collapse-item {
    margin-bottom: 4px;
    &:last-child {
      margin-bottom: 0;
    }
  }
  .is-active {
    background-color: #fff;
  }
}
</style>
